<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <!-- 点击图⽚，图⽚向左翻转90度翻转 -->
  <style>
    img{
      width: 100px;
      height: 100px;
      display: inline-block;
    }
  </style>
</head>
<body>
  <img src="../img/logo.png" alt="图片" id="img1">
  <script>
    var img = document.getElementById("img1")
    img.onclick = function(){
      img.style.transform = 'rotate('+-90+'deg)';
    }
  </script>
</body>
</html>